.chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  position: relative;
  background-color: #f5f7fa;
}

.chat-header {
  height: 61px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f3f5fc;
  border-bottom: 1px solid #e8f2ff;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
}

.icon-button {
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
}

.user-profile {
  height: 36px;
  width: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  /* background-color: #6c5ce7; */
  color: white;
  font-weight: 500;
}

.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 180px);
  scroll-behavior: smooth;
  background: #f3f5fc;
  align-items: center;
  overscroll-behavior: contain; /* 防止滚动穿透 */
  -webkit-overflow-scrolling: touch; /* 在iOS上提供更好的滚动体验 */
}

.messages-container-with-input {
  justify-content: center;
  align-items: center;
  /* padding-bottom: 120px; */
}

.welcome-message {
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%);
  border-radius: 24px;
  box-shadow: 0 8px 24px rgba(149, 157, 165, 0.1);
  max-width: 800px;
  margin: 40px auto;
}

.welcome-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.welcome-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.welcome-avatar {
  width: 120px;
  height: 120px;
  border-radius: 60px;
  object-fit: cover;
  border: 4px solid #e6f3ff;
}

.welcome-header h1 {
  font-size: 32px;
  background: linear-gradient(135deg, #1a73e8 0%, #4285f4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
}

.quick-actions {
  display: flex;
  flex-direction: row;
  gap: 16px;
  width: 100%;
  max-width: 780px;
}

.quick-action-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 16px;
}

.quick-action-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  width: 100%;
}

.quick-action-item {
  flex: 1;
  max-width: 250px;
  min-width: 150px;
  padding: 20px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  height: 120px;
  justify-content: center;
}

.quick-action-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  background: linear-gradient(135deg, #f8fbff 0%, #ffffff 100%);
}

.quick-action-item i {
  font-size: 32px;
  color: #1a73e8;
}

.quick-action-item span {
  font-size: 16px;
  color: #333;
  font-weight: 500;
}

.welcome-tips {
  text-align: left;
  padding: 20px;
  background: #f8fbff;
  border-radius: 12px;
  width: 100%;
  max-width: 600px;
}

.welcome-tips p {
  font-size: 16px;
  color: #666;
  margin-bottom: 12px;
}

.welcome-tips ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.welcome-tips li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  color: #555;
  font-size: 15px;
}

.welcome-tips li i {
  color: #1a73e8;
}

.message {
  display: flex;
  width: 100%;
  justify-content: center;
  padding: 16px 0;
  position: relative;
}

.message.user {
  background-color: #f3f5fc;
}

.message.assistant {
  background-color: #f3f5fc;
}

.message-content {
  width: 70%;
    /* margin: 0px auto; */
    padding: 0;
    display: flex
;
    align-items: flex-start;
    gap: 16px;
    position: relative;
    /* margin-left: 10px; */
    margin-right: 26px;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.message.user .message-avatar {
  background-color: #e8f0fe;
  color: #1a73e8;
}

.message.assistant .message-avatar {
  background-color: #f0f7ff;
}

.message-text {
  flex: 1;
  font-size: 15px;
  /* line-height: 1.6; */
  color: #333;
  padding: 0 16px;
}

/* 任务容器样式调整 */
.task-container {
  margin: 12px 0;
  width: 100%;
  background-color: transparent;
  padding: 8px 0;
  overflow-x: hidden; /* 防止水平溢出 */
  word-wrap: break-word; /* 确保长文本会换行 */
}

.task-header {
  width: 100%;
  padding: 0;
  display: flex;
  align-items: center;
}

.action-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #666;
}

.buttons-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  padding: 0 8px;
}

.search-button, .reasoning-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  background-color: #f5f5f5;
  border: none;
  border-radius: 18px;
  cursor: pointer;
  gap: 6px;
  font-size: 14px;
  color: #333;
}

.search-button:hover, .reasoning-button:hover {
  background-color: #e5e5e5;
}

.action-buttons {
  display: flex;
  overflow-x: auto;
  gap: 8px;
  padding-bottom: 4px;
}

.action-icon-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 14px;
  border: 1px solid #e5e5e5;
  border-radius: 18px;
  background-color: white;
  cursor: pointer;
  font-size: 13px;
  color: #333;
  white-space: nowrap;
}

.action-icon-button:hover {
  background-color: #f5f5f5;
}

.more-button {
  padding: 8px 16px;
  border: 1px solid #e5e5e5;
  border-radius: 18px;
  background-color: white;
  cursor: pointer;
  font-size: 13px;
  color: #333;
  white-space: nowrap;
}

.more-button:hover {
  background-color: #f5f5f5;
}

.search-site {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #ebeef5;
}

.site-actions {
  display: flex;
  gap: 10px;
}

.action-button {
  display: flex;
  align-items: center;
  padding: 4px 8px;
}

.action-button i {
  margin-right: 4px;
}

.action-text {
  font-size: 12px;
}

/* 打字指示器样式 */
.typing-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
}

.typing-indicator span {
  height: 8px;
  width: 8px;
  margin: 0 2px;
  background-color: #999;
  border-radius: 50%;
  display: inline-block;
  animation: typing 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) {
  animation-delay: 0s;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.5);
  }
  100% {
    transform: scale(1);
  }
}

.disabled-button {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 任务容器样式 */
.task-container {
  /* margin-bottom: 20px; */
  width: 100%; /* 确保任务容器有足够的宽度 */
  background-color: #fff; /* 白色背景 */
  border-radius: 8px; /* 圆角 */
  padding: 12px 16px; /* 内边距 */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); /* 轻微阴影 */
}

.task-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 4px 0;
  transition: all 0.3s ease;
}

.task-header:hover {
  background-color: rgba(26, 115, 232, 0.05);
}

.task-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-complete-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: #1a73e8;
  color: white;
  font-size: 12px;
  margin-left: 8px;
  transform: scale(0);
  transition: transform 0.3s ease;
}

.task-container.completed .task-complete-icon {
  transform: scale(1);
}

.task-toggle-icon {
  margin-left: auto;
  color: #909399;
  font-size: 14px;
  transition: transform 0.3s ease;
}

.task-toggle-icon.el-icon-arrow-down {
  transform: rotate(0deg);
}

.task-toggle-icon.el-icon-arrow-up {
  transform: rotate(180deg);
}

.task-title {
  margin: 0;
  color: #333;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color 0.3s;
}

.task-title-bold {
  font-size: 20px;
  font-weight: 700;
  color: #333;
}

.task-steps {
  list-style-type: none;
  padding-left: 0;
  margin: 0;
  word-break: break-word;
  transition: all 0.3s ease;
  max-height: 70vh; /* 限制最大高度 */
  overflow-y: auto; /* 允许内部滚动 */
  padding-right: 10px; /* 为滚动条留出空间 */
}

/* 自定义滚动条样式 */
.task-steps::-webkit-scrollbar {
  width: 6px;
}

.task-steps::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.task-steps::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

.task-steps::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.task-step {
  
  font-size: 14px;
  color: #5e6772;
  font-style: normal;
  font-weight: 400;
  line-height: 22px;
  letter-spacing: .5px;
  margin-bottom: 4px;
  white-space: pre-wrap; /* 保留换行符并自动换行 */
}

.task-container.collapsing .task-steps {
  max-height: 0;
  opacity: 0;
  transition: all 0.5s ease;
}

.task-container.completed .task-title {
  color: #1a73e8;
  transition: all 0.3s ease;
  display: contents;
}

.task-container.completed .task-toggle-icon {
  color: #1a73e8;
  transition: all 0.3s ease;
}

.task-container.completed .task-complete-icon {
  opacity: 1;
  transform: scale(1);
}

.step-status .el-icon-check {
  color: #fff;
  font-size: 16px;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s ease;
}

.step-status .el-icon-check.visible,
.task-step .step-status .el-icon-check {
  opacity: 1;
  transform: scale(1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 在移动设备上使用更大的宽度 */
@media (max-width: 768px) {
  .input-container, .input-container-bottom {
    width: 85%;
  }
}

/* 产业链图谱容器样式 */
.industry-chain-graph-container {
  margin-top: 16px;
  padding: 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid #ebeef5;
}

.step-content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.step-status {
  flex-shrink: 0;
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-status .el-icon-loading {
  color: #409EFF;
  font-size: 16px;
}

.input-wrapper {
  /* position: fixed;
  bottom: 0;
  left: 0;
  right: 0; */
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #f3f5fc 20%);
  padding: 20px 0;
  display: flex;
  justify-content: center;
  /* z-index: 100; */
}

.input-container {
  width: 65%;
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  cursor: text;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.input-container:focus-within {
  border-color: #409EFF;
  box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.1);
}

.input-container-bottom {
  width: 65%;
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  cursor: text;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.input-container-bottom:focus-within {
  border-color: #409EFF;
  box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.1);
}

.input-box {
  display: flex;
  align-items: center;
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  margin-bottom: 12px;
  cursor: text;
}

.input-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: #333;
  line-height: 1.5;
  padding: 4px 0;
}

.input-box input::placeholder {
  color: #909399;
}

.button-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.left-buttons {
  display: flex;
  gap: 10px;
}

.left-buttons :deep(.el-button--small) {
  height: 32px;
  padding: 0 15px;
  font-size: 12px;
}

.left-buttons :deep(.el-upload) {
  width: auto;
}

.left-buttons :deep(.el-button) {
  width: auto;
  white-space: nowrap;
}

.send-button {
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.send-button i {
  font-size: 20px;
}

.upload-demo {
  margin-right: 10px;
}

.upload-demo :deep(.el-upload-list) {
  position: absolute;
  bottom: 100%;
  left: 0;
  background: white;
  border-radius: 4px;
  box-shadow: 0 2px 12px 0 rgba(0,0,0,0.1);
  padding: 10px;
  margin-bottom: 8px;
  max-height: 200px;
  overflow-y: auto;
  min-width: 350px;
}

.upload-demo :deep(.el-upload-list__item) {
  margin-top: 5px;
  padding: 5px 10px;
  border-radius: 4px;
  background-color: #f5f7fa;
  transition: all 0.3s;
}

.upload-demo :deep(.el-upload-list__item:hover) {
  background-color: #e6f1fc;
}

.upload-demo :deep(.el-upload-list__item-name) {
  color: #606266;
  margin-left: 5px;
}

.upload-button {
  width: 130.09px;
  height: 40px;
  padding: 12px 20px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-button i {
  margin-right: 5px;
}



.task-step .step-content {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}